#include<iostream>
using namespace std;
int main()
{
	int n,a,b,c,o;
	cin>>n;
	a=n/100;
	b=n/10-10*a;
	c=n-100*a-10*b;
	o=a*a*a+b*b*b+c*c*c;
	if(n==o)
	{
		cout<<"TRUE";
	}
	else
	{
		cout<<"FALSE";
	}
	return 0;
}
